﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Upeu.Matricula.Data.Entities;
//Alvaro huanca Perez
namespace Upeu.Matricula.Data.Mappings
{
    public class TutorMap : EntityTypeConfiguration<Tutor>
    {
        public TutorMap()
        {
            
            ToTable("tutor");
            HasKey(t => t.Tutor_Id);
            Property(t => t.Tutor_Id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            Property(t => t.Nombre).IsRequired();
            Property(t => t.Apellido_Paterno).IsRequired();
            Property(t => t.Apellido_Materno).IsRequired();
            Property(t => t.Direccion).IsRequired();
            Property(t => t.tutorDni).IsRequired(); 
            Property(t => t.Telefono).IsRequired();
            Property(t => t.E_mail).IsOptional();
            
        }
    }
}
